<extend name="Public/base" />

<block name="body">
	<style type="text/css">
	.pic_ul li {float: left; width: 100px;}
	.pic_ul li img { vertical-align: middle;}
	.pic_ul li .title, .pic_ul li .action { text-align: center; width: 100px}
	</style>
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>图标s - 【{$pack.name}】</h2>
	</div>
	<div class="cf">
		<div class="fl">
            <a class="btn" href="{:U('add?pack_id='.$pack_id)}">新 增</a>
           <!--  <button class="btn btn-default ajax-post" url="{:U('changeStatus',array('method'=>'resume'))}" target-form="ids">启 用</button>
            <button class="btn btn-default ajax-post" url="{:U('changeStatus',array('method'=>'forbid'))}" target-form="ids">禁 用</button> -->
            <button class="btn ajax-post confirm btn-danger" url="{:U('del')}" target-form="ids">删 除</button>
        </div>

        <!-- 高级搜索 -->
		<!-- <div class="search-form fr cf">
			<div class="sleft">
				<input type="text" name="name" class="search-input" value="{:I('name')}" placeholder="请输入游戏名">
				<a class="sch-btn" href="javascript:;" id="search" url="{:U('index')}"><i class="btn-search"></i></a>
			</div>
		</div> -->
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="table table-bordered">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class=""></th>
		</tr>
    </thead>
    <tbody>
		 
	</tbody>
    </table>
    <br />
    <ul class="pic_ul">
    	<volist name="_list" id="vo">
	 	<li>
	 		<label>
	 		<input class="ids" type="checkbox" name="id[]" value="{$vo.id}" />
	 		<img alt="{$vo.name|htmlspecialchars_decode}" title="{$vo.name|htmlspecialchars_decode}" src="__ROOT__{$vo.pic}" width="60" height="60" />
	 		</label>
	 		<div class="title">{$vo.name|htmlspecialchars_decode}</div>
	 		<div class="action"><a class="btn btn-default btn-xs" title="编辑" href="{:U('edit?id='.$vo['id'])}"><i class="glyphicon glyphicon-pencil"></i></a> | <a href="{:U('del?id='.$vo['id'])}" class="confirm ajax-get">删除</a></div>
	 	</li>
	 	</volist>
	 </ul>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

	<script type="text/javascript">
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});
	//回车搜索
	$(".search-input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
    //导航高亮
    highlight_subnav('{:U('IconPacks/index')}');
	</script>
</block>
